#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=600;
typedef int LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL ko[maxn],un[maxn];
vector<LL>g[maxn];
bool ma[maxn][maxn];
bool vis[maxn];
LL n,m,a,b;
void dfs(LL u){
  for(LL i=1;i<=n;i++){
    if(!vis[i]){
        if(ma[u][i]||ma[i][u]) ko[i]--;
        else  un[i]--;
        if(ko[i]<a||un[i]<b){
            vis[i]=true;
            dfs(i);
        }
    }
  }
}
int main(void)
{
  scanf("%d%d%d%d",&n,&m,&a,&b);
  for(LL i=1;i<=m;i++){
    LL u,v;scanf("%d%d",&u,&v);
    g[u].push_back(v);
    g[v].push_back(u);
    ko[u]++;ko[v]++;
    ma[u][v]=ma[v][u]=1;
  }
  for(LL i=1;i<=n;i++){
    un[i]=(n-1-ko[i]);
  }
  for(LL i=1;i<=n;i++){
    if(!vis[i]&&(ko[i]<a||un[i]<b)){
        vis[i]=true;
        dfs(i);
    }
  }
  LL sum=0;
  for(LL i=1;i<=n;i++){
    if(ko[i]>=a&&un[i]>=b){
        sum++;
    }
  }
  printf("%d\n",sum);
return 0;
}
